/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class AccessproviderPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "menuProviderId")
    private short menuProviderId;
    @Basic(optional = false)
    @Column(name = "submenuProviderId")
    private short submenuProviderId;
    @Basic(optional = false)
    @Column(name = "optionProviderId")
    private short optionProviderId;
    @Basic(optional = false)
    @Column(name = "providerId")
    private int providerId;
    @Basic(optional = false)
    @Column(name = "userProviderId")
    private int userProviderId;

    public AccessproviderPK() {
    }

    public AccessproviderPK(short menuProviderId, short submenuProviderId, short optionProviderId, int providerId, int userProviderId) {
        this.menuProviderId = menuProviderId;
        this.submenuProviderId = submenuProviderId;
        this.optionProviderId = optionProviderId;
        this.providerId = providerId;
        this.userProviderId = userProviderId;
    }

    public short getMenuProviderId() {
        return menuProviderId;
    }

    public void setMenuProviderId(short menuProviderId) {
        this.menuProviderId = menuProviderId;
    }

    public short getSubmenuProviderId() {
        return submenuProviderId;
    }

    public void setSubmenuProviderId(short submenuProviderId) {
        this.submenuProviderId = submenuProviderId;
    }

    public short getOptionProviderId() {
        return optionProviderId;
    }

    public void setOptionProviderId(short optionProviderId) {
        this.optionProviderId = optionProviderId;
    }

    public int getProviderId() {
        return providerId;
    }

    public void setProviderId(int providerId) {
        this.providerId = providerId;
    }

    public int getUserProviderId() {
        return userProviderId;
    }

    public void setUserProviderId(int userProviderId) {
        this.userProviderId = userProviderId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) menuProviderId;
        hash += (int) submenuProviderId;
        hash += (int) optionProviderId;
        hash += (int) providerId;
        hash += (int) userProviderId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AccessproviderPK)) {
            return false;
        }
        AccessproviderPK other = (AccessproviderPK) object;
        if (this.menuProviderId != other.menuProviderId) {
            return false;
        }
        if (this.submenuProviderId != other.submenuProviderId) {
            return false;
        }
        if (this.optionProviderId != other.optionProviderId) {
            return false;
        }
        if (this.providerId != other.providerId) {
            return false;
        }
        if (this.userProviderId != other.userProviderId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.AccessproviderPK[ menuProviderId=" + menuProviderId + ", submenuProviderId=" + submenuProviderId + ", optionProviderId=" + optionProviderId + ", providerId=" + providerId + ", userProviderId=" + userProviderId + " ]";
    }
    
}
